<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Mark Anything 设置</title>
  <style>
    body {
      padding: 20px;
      font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
      background-color: #f5f5f5;
      color: #333;
    }
    .container {
      max-width: 800px;
      margin: 0 auto;
      background: white;
      padding: 30px;
      border-radius: 16px;
      box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    }
    .header {
      margin-bottom: 30px;
      padding-bottom: 20px;
      border-bottom: 1px solid #eee;
    }
    .header h1 {
      margin: 0;
      font-size: 24px;
      color: #2c3e50;
    }
    .header p {
      margin: 8px 0 0;
      color: #666;
      font-size: 14px;
    }
    .settings-section {
      margin-bottom: 30px;
    }
    .settings-section h2 {
      font-size: 18px;
      color: #2c3e50;
      margin-bottom: 20px;
    }
    .form-group {
      margin-bottom: 24px;
    }
    label {
      display: block;
      margin-bottom: 8px;
      font-weight: 500;
      color: #444;
    }
    .description {
      font-size: 13px;
      color: #666;
      margin-bottom: 8px;
    }
    input[type="text"],
    input[type="number"],
    select {
      width: 100%;
      padding: 10px 12px;
      border: 1px solid #ddd;
      border-radius: 8px;
      font-size: 14px;
      transition: all 0.2s ease;
    }
    input[type="text"]:focus,
    input[type="number"]:focus,
    select:focus {
      border-color: #4CAF50;
      box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
      outline: none;
    }
    .switch-container {
      display: flex;
      align-items: center;
      gap: 10px;
    }
    .switch {
      position: relative;
      display: inline-block;
      width: 44px;
      height: 24px;
    }
    .switch input {
      opacity: 0;
      width: 0;
      height: 0;
    }
    .slider {
      position: absolute;
      cursor: pointer;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background-color: #ccc;
      transition: .4s;
      border-radius: 24px;
    }
    .slider:before {
      position: absolute;
      content: "";
      height: 18px;
      width: 18px;
      left: 3px;
      bottom: 3px;
      background-color: white;
      transition: .4s;
      border-radius: 50%;
    }
    input:checked + .slider {
      background-color: #4CAF50;
    }
    input:checked + .slider:before {
      transform: translateX(20px);
    }
    button {
      background-color: #4CAF50;
      color: white;
      padding: 12px 24px;
      border: none;
      border-radius: 8px;
      cursor: pointer;
      font-size: 14px;
      font-weight: 500;
      transition: all 0.2s ease;
    }
    button:hover {
      background-color: #45a049;
      transform: translateY(-1px);
    }
    .secondary-button {
      background-color: #fff;
      color: #4CAF50;
      border: 1px solid #4CAF50;
    }
    .secondary-button:hover {
      background-color: #f8f9fa;
      color: #45a049;
      border-color: #45a049;
    }
    .status {
      margin-top: 16px;
      padding: 12px;
      border-radius: 8px;
      display: none;
      font-size: 14px;
    }
    .success {
      background-color: #d4edda;
      color: #155724;
      border: 1px solid #c3e6cb;
    }
    .error {
      background-color: #f8d7da;
      color: #721c24;
      border: 1px solid #f5c6cb;
    }
    .range-container {
      display: flex;
      align-items: center;
      gap: 15px;
    }
    .range-value {
      min-width: 45px;
      font-size: 14px;
      color: #666;
    }
    input[type="range"] {
      flex: 1;
      height: 4px;
      -webkit-appearance: none;
      background: linear-gradient(to right, #4CAF50 0%, #4CAF50 50%, #ddd 50%, #ddd 100%);
      border-radius: 2px;
      outline: none;
    }
    input[type="range"]::-webkit-slider-thumb {
      -webkit-appearance: none;
      width: 18px;
      height: 18px;
      background: #4CAF50;
      border-radius: 50%;
      cursor: pointer;
      transition: all 0.2s ease;
      box-shadow: 0 2px 6px rgba(76, 175, 80, 0.2);
    }
    input[type="range"]::-webkit-slider-thumb:hover {
      transform: scale(1.1);
      background: #45a049;
      box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
    }
    input[type="number"] {
      width: 100%;
      padding: 10px 12px;
      border: 1px solid #ddd;
      border-radius: 8px;
      font-size: 14px;
      transition: all 0.2s ease;
    }
  </style>
</head>
<body>
  <div class="container">
    <div class="header">
      <h1>Mark Anything 设置</h1>
      <p>配置你的标记助手，让它更好地为你服务</p>
    </div>

    <div class="settings-section">
      <h2>待办事项设置</h2>
      <div class="form-group">
        <div class="switch-container">
          <label class="switch">
            <input type="checkbox" id="showTodoScroll">
            <span class="slider"></span>
          </label>
          <label for="showTodoScroll">显示网页顶部待办事项滚动区域</label>
        </div>
        <div class="description">开启后将在网页顶部显示待办事项滚动区域</div>
      </div>
    </div>

    <div class="settings-section">
      <h2>API 设置</h2>
      <div class="form-group">
        <label for="apiKey">Qwen API Key</label>
        <div class="description">用于AI功能的API密钥，请从官方获取</div>
        <input type="text" id="apiKey" placeholder="请输入你的 Qwen API Key">
      </div>
      <div class="form-group">
        <label for="modelType">模型选择</label>
        <div class="description">选择要使用的大模型类型</div>
        <select id="modelType">
          <option value="qwen-turbo">Qwen-Turbo (默认)</option>
          <option value="qwen-max">Qwen-Max</option>
        </select>
      </div>
    </div>

    <div class="settings-section">
      <h2>数据管理</h2>
      <div class="form-group">
        <div class="description">导出数据将保存所有的笔记、待办事项和便签到本地文件</div>
        <div style="display: flex; gap: 10px;">
          <button id="exportData" class="secondary-button">导出数据</button>
          <button id="importData" class="secondary-button">导入数据</button>
          <input type="file" id="importFile" accept=".json" style="display: none;">
        </div>
      </div>
    </div>

    <button id="save">保存设置</button>
    <div id="status" class="status"></div>
  </div>
  <script src="options.js"></script>
</body>
</html> 